﻿namespace Skymate.Log4net
{
    using System.Reflection;

    using Castle.Facilities.Logging;

    using Skymate.Modules;

    [DependsOn(typeof(AbpKernelModule))]
    public class SkymateLog4NetModule:AbpModule
    {
        public override void PreInitialize()
        {
            IocManager.IocContainer.AddFacility<LoggingFacility>(f => f.UseLog4Net().WithConfig("log4net.config"));
        }

        /// <inheritdoc/>
        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
            
        }

        public override void PostInitialize()
        {
            
        }
    }
}